<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-10-19 10:26:13
 * @Description: 自提点
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-10-20 10:33:01
 * @FilePath: /qingshanERP/database/migrations/shop/user/2021_10_19_102613_create_pickup_address.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePickupAddress extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('pickup_addresss', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->string('name', 100)->comment('自提点名称');
            $table->integer('province_id')->default(0)->comment('省');
            $table->integer('city_id')->default(0)->comment('市');
            $table->integer('area_id')->default(0)->comment('区');
            $table->string('address')->nullable()->comment('详细地址');
            $table->string('lat')->nullable()->comment('纬度');
            $table->string('lnt')->nullable()->comment('经度');
            $table->boolean('status')->default(1)->comment('状态 1正常 0禁用');
            $table->tinyInteger('del_flag')->default(0)->comment('删除状态（1删除 0正常）');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('pickup_addresss');
    }
}
